<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="include/rsouce.jsp"%>
<title>登录——我的博客</title>
</head>
<body>
	<div class="container-fluid">
		<%@include file="include/header.jsp"%>
		<div class="row">
			<div class="col=12">
				<img src="img\t1.jpg" class="img-fluid  " alt="">
			</div>

		</div>
		<div class="row">
			<div class="col-4"></div>
			<div class="col-4" style="padding-top: 10px;">
				<form action="signin.html" method="post">
					<div class="input-group mb-3">
						<div class="input-group-prepend">
							<span class="input-group-text" id="ba-username"> <i
								class="fas fa-user"></i>
							</span>
						</div>
						<input type="text" class="form-control" name="username"
							placeholder="请输入账号" aria-describedby="ba-username" autofocus autocomplete="off" 
							value="<%=request.getAttribute("username") == null ? "" : request.getAttribute("username")%>">
					</div>
					<div class="input-group mb-3">
						<div class="input-group-prepend">
							<span class="input-group-text" id="ba-password"> <i
								class="fas fa-unlock"></i>
							</span>
						</div>
						<input id="password" type="password" class="form-control"
							name="password" placeholder="请输入密码"
							aria-describedby="ba-password">
					</div>
					<div class="input-group mb-3">
						<div class="input-group-prepend">
							<span class="input-group-text" id="ba-leanpub"> <i
								class="fas fa-closed-captioning"></i>
							</span>
						</div>
						<input id="Verification" type="text" class="form-control" maxlength="4" autocomplete="off" 
							name="Verification" placeholder="请输入验证码"
							aria-describedby="ba-Verification">
							<div class="input-group-append">
      <span class="input-group-text" style="padding: 0px;"><img id="captchaImg" alt="验证码" src=<%="Tupian.html" %> onclick="changeCaptch()" ></span>
    </div>
					</div >
					<div class="yz" style="text-align: right ;">
					
					<p><a href="javascript:;" onclick="changeCaptch()">看不清楚，点击换一张！</a></p>
					</div>
					<div class="form-group">
						<button type="submit" class="btn btn-primary btn-lg btn-block">登录</button>
					</div>
				</form>
				<div class="text-danger">
					<%
						String msg = (String) request.getAttribute("message");
						if (msg != null) {
					%>
					<%=msg%>
					<script type="text/javascript">
						var pwd = document.getElementById("password");
						pwd.focus();
					</script>
					<%
						}
					%>
				</div>
			</div>
			<div class="col-4"></div>
		</div>
	</div>
	<script type="text/javascript">
		function changeCaptch(){
			var im=document.getElementById("captchaImg");
			im.src="Tupian.html?time="+ new Date().getTime();
		}
	</script>
</body>
</html>